<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;

class ResponseController extends Controller
{
    //文件下载
    public  function getDownload(){
        return response()->download('./upload/1.jpg');
    }
    //响应
    public  function getIndex(){
        //响应字符串
        //return '字符串';
        //返回模板
        //return view('test.upfile');
        //返回json格式的字符串
        //return response()->json(Array('username'=>'list','age'=>'12','sex'=>'男'));
        //页面跳转
        return redirect('test/form');
    }
}
